//
//  Record.swift
//  MasterDetail2
//
//  Created by Max Chiodo on 9/30/14.
//  Copyright (c) 2014 SSW. All rights reserved.
//

import Foundation

class Choices {
    
}

class Records {
    var unique : Int
    
    init() {
        self.unique = 0
    }
    
    func create() -> Record {
        self.unique += 1
        var nm  = String(unique)
        var r = Record(name: nm, id: unique, choice: "none")
        return r
    }
    
}

class Record {
    var date   : NSDate
    var name   : String
    var id     : Int
    var choice : String
    
    init(name: String, id: Int, choice: String) {
        self.name = name
        self.id = id
        self.date = NSDate()
        self.choice = choice
        //super.init()
    }
    
    func simpleDescription() -> String {
        return "N \(name) with \(choice)."
    }
    
    func detailedDescription() -> String {
        return simpleDescription() + " and MORE"
    }
}
